package polymorphicdemo;
//导包
import polymorphic.Teacher;

public class Test {
    public static void main(String[] args) {
        Person p = new Person("小明", 30);
        p.keepPet(new Dog(2, "白"), "骨头");
        p.keepPet(new Cat(1, "黑"), "鱼");
        //空参构造器
        Dog d = new Dog();
        Cat c = new Cat();
        Teacher t = new Teacher();
    }
}
